package com.xls.box2023.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lzz.bottomencapsulation.holder.MvpRVViewHolder;
import com.xls.box2023.R;
import com.xls.box2023.entity.AppsRulesEntity;

import androidx.core.content.ContextCompat;

public class DuiHuanJiBiTabItemView extends MvpRVViewHolder<AppsRulesEntity> {
    private TextView duihuanjinbi_tab_title;
    private TextView duihuanjinbi_tab_num;
    String type;

    public DuiHuanJiBiTabItemView(Context context,String type, ViewGroup p) {
        super(R.layout.item_duihuanjinbi_tab, context, p);
        this.type=type;
    }

    @Override
    public void initView() {
        duihuanjinbi_tab_title = itemView.findViewById(R.id.duihuanjinbi_tab_title);
        duihuanjinbi_tab_num = itemView.findViewById(R.id.duihuanjinbi_tab_num);
        duihuanjinbi_tab_title.setText(viewData.getExchangeValue()+"金币");
        duihuanjinbi_tab_num.setText("可兑换"+viewData.getExchangeCount()+"次");
        duihuanjinbi_tab_title.setSelected(viewData.isSelector());
        if (viewData.isSelector()){
            duihuanjinbi_tab_title.setTextColor(ContextCompat.getColor(context,R.color.white));
        }else {
            duihuanjinbi_tab_title.setTextColor(ContextCompat.getColor(context,com.xls.resource.R.color.text_black));
        }
//        if (TextUtils.equals(type, StateConsts.TiXianType.ShouYi)){
//            duihuanjinbi_tab_num.setVisibility(View.VISIBLE);
//        }else{
//            duihuanjinbi_tab_num.setVisibility(View.GONE);
//        }
    }
}
